﻿@model KRM.Core.KnowledgeBase
@{
    ViewBag.Title = Model.Id > 0 ? "Edit: " + Model.Title : "Add new Knowledge base";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="/js/plugins/ckeditor/ckeditor.js"></script>
<script src="/js/plugins/ckfinder/ckfinder.js"></script>
<div class="box">
    <div class="box-title">
        <h3><i class="icon-edit"></i>Add new item</h3>
    </div>
    <div class="box-content">
        @Html.Partial("Partial/_MessageResult")
        <form action="/knowledgebase/item" method="POST">
            <input type="hidden" name="Id" value="@Model.Id"/>
            <div class="row-fluid">
                <div class="span1">Title</div>
                <div class="span8">
                    <input type="text" class="input-block-level" name="title" required="required" value="@Model.Title"/>
                </div>
            </div>
            <div class="row-fluid">
                <p>Content</p>
                <textarea class="ckeditor" name="content">@Model.Content</textarea>
            </div>
            <div class="form-actions text-center">
                <button type="submit" class="btn btn-primary" style="margin-right: 10px">@(Model.Id > 0 ? "Update" : "Add new")</button>
                <button type="reset" class="btn">Reset</button>
            </div>
        </form>
    </div>
</div>

